package com.xuzimian.globaldemo.spring.springrpc.hessian;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.caucho.HessianProxyFactoryBean;

import com.xuzimian.globaldemo.spring.springrpc.RemoteServerPublisService;

@Configuration
public class ClientHessianConfig {

	/**
	 * 端口号可能有冲突，请修改端口号
	 * @return
	 */
	@Bean(name="hessianService")
	public HessianProxyFactoryBean remoteServerPublisService() {
		HessianProxyFactoryBean proxyFactoryBean=new HessianProxyFactoryBean();
		proxyFactoryBean.setServiceUrl("http://localhost:8080/xx/hessianremote.hessianservice");
		proxyFactoryBean.setServiceInterface(RemoteServerPublisService.class);
		return proxyFactoryBean;
	}
}
